package com.example.moduleone.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.widget.FrameLayout;

import com.example.baselibrary.activity.BaseNewActivity;
import com.example.baselibrary.bean.PublicViewHolder;
import com.example.moduleone.R;
import com.example.moduleone.fragment.ModuleOneTestFragment;

import cc.vv.lklibrary.log.LogOperate;

/**
 * Created by sun.li on 2018/4/12.
 *
 * @author sun.li
 */

public class ModuleOneTestActivity extends BaseNewActivity {

    private ViewHolder viewHolder;

    @Override
    protected int initLayoutRes() {
        return R.layout.activity_test_module_one;
    }

    @Override
    protected PublicViewHolder initViewHolderObject() {
        viewHolder = new ViewHolder();
        return viewHolder;
    }

    @Override
    protected void baseOnClick(int viewId) {

    }

    @Override
    protected void initView(@Nullable Bundle bundle) {
        super.initView(bundle);
        try {
            FragmentManager fragmentManager = getSupportFragmentManager();
            FragmentTransaction transaction = fragmentManager.beginTransaction();
            ModuleOneTestFragment moduleOneTestFragment = new ModuleOneTestFragment();
            transaction.add(R.id.fl_mota_layout, moduleOneTestFragment);
            transaction.commit();
        } catch (Exception e) {
            LogOperate.e(e);
        }
    }

    public class ViewHolder extends PublicViewHolder {
        private FrameLayout fl_mota_layout;
    }
}
